package com.springcloud.tread.config;

import com.springcloud.tread.job.IndexDataSyncJob;
import org.quartz.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
//public class QuartzConfiguration {
//    private static final int interval = 1;
//
//    //加进任务
//    @Bean
//    public JobDetail weatherDataSyncJobDetail() {
//        return JobBuilder.newJob(IndexDataSyncJob.class).withIdentity("indexDataSyncJob")
//                .storeDurably().build();
//    }
//
//    //设置时间
//    @Bean
//    public Trigger weatherDataSyncTrigger() {
//        SimpleScheduleBuilder schedBuilder = SimpleScheduleBuilder.simpleSchedule()
//                .withIntervalInMinutes(interval).repeatForever();
//
//        return TriggerBuilder.newTrigger().forJob(weatherDataSyncJobDetail())
//                .withIdentity("indexDataSyncTrigger").withSchedule(schedBuilder).build();
//    }
//}
